<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script type="text/javascript">	

		function Student(name,age,gender){
			this.name=name;
			this.age=age;
			this.gender=gender;
		}

		/*Student.prototype.say=function(){
			alert("hello-say---");
		}
		Student.prototype.run=function(){
			alert("run----");
		}*/

		Student.prototype={
			constructor:Student,
			enjoy:function(){
				alert("enjoy----");
			},
			work:function(){
				alert("work--")
			}
		}




		var stu1=new Student("lisi",20,"men");
		var stu2=new Student("tom",24,"men");

		stu1.enjoy();
		stu2.enjoy();

		console.log(stu1.constructor);
		console.log(stu2.constructor);
	/*	stu1.say();
		stu2.say();
		console.log(stu1.say==stu2.say);*/










	</script>
</head>
<body>
	
</body>
</html>